package putao.views
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	
	import putao.views.components.ButtonBase;
	
	public class Login extends Sprite
	{
		public var btnLogin:ButtonBase = new ButtonBase("登录");
		private var uName:TextField = new TextField();
		
		public function Login()
		{
			super();
			
			init();
		}
		
		public function init():void
		{
			btnLogin.x = 500;
			btnLogin.y = 500;
			this.addChild(btnLogin);
			btnLogin.addEventListener(MouseEvent.CLICK, onLogin);
		}
		
		private function onLogin(e:MouseEvent):void
		{
			Global.getInstance().userName = Math.random().toString();
		}
	}
}